/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2022-11-01
 * Time: 11:31
 */
public class Point {
    public int x,y;

    public Point() {
        x=0;
        y=0;
    }

    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }
    public void setX(int x) {
        this.x = x;
    }
    public void setY(int y) {
        this.y = y;
    }


    public int getX() {
        return x;
    }



    public int getY() {
        return y;
    }


    @Override
    public int hashCode() {
        return new Integer(x)+new Integer(y);
    }

    @Override
    public boolean equals(Object obj) {
        if(this.getX()==this.getY()){
            return true;
        }
         return   false;
    }

    @Override
    public String toString() {
        return Point.class.getName()+getX()+getY();
    }

    public static void main(String[] args) {
        Point point =new Point(2,5);
        System.out.println(point.equals(1));
        System.out.println(point.hashCode());;
        System.out.println(point.toString());
    }
}
